<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

class Website extends CI_Controller {

    function __construct() {
        parent::__construct();
    }

    public function index() {
        $this->principal();
    }

    function login() {
        $this->load->view('website/login');
    }

    function principal() {
        $this->load->view('website/header');
        $this->load->view('website/principal');
        $this->load->view('website/footer');
    }

    function busqueda() {
        $this->load->view('website/header');
        $this->load->view('website/busqueda');
        $this->load->view('website/footer');
    }

    /* function getTerminalesOrigenAjax() {
      $url = REST_SERVER_SERVICES . 'terminal/origenes/format/json';
      $this->curl->create($url);
      $this->curl->http_login(REST_USER, REST_PASS);
      $jsonResponse = $this->curl->simple_get($url);
      echo $jsonResponse;
      } */

    /* function getTerminalesDestinoAjax() {
      $idTerminalOrigen = $this->input->get('idTerminalOrigen');

      $url = REST_SERVER_SERVICES . 'terminal/destinos/idTerminalOrigen/' . $idTerminalOrigen . '/format/json';
      //http://localhost:8080/squirServices/services/terminal/destinos/idTerminalOrigen/1/format/json
      //http://squirteam.com/charzcode/tesis/production/squirServices/services/terminal/destinos/idTerminalOrigen/1/format/json
      $this->curl->create($url);
      $this->curl->http_login(REST_USER, REST_PASS);
      $jsonResponse = $this->curl->simple_get($url);
      echo $jsonResponse;
      } */

    /* function getServiciosAjax() {
      $idTerminalOrigen = $this->input->get('idTerminalOrigen');
      $idTerminalDestino = $this->input->get('idTerminalDestino');
      $fecha = $this->input->get('fecha');

      $url = REST_SERVER_SERVICES . 'itinerario/servicios/idTerminalOrigen/' . $idTerminalOrigen . '/idTerminalDestino/' . $idTerminalDestino . '/fecha/' . $fecha . '/format/json';
      //http://localhost:8080/squirServices/services/itinerario/servicios/idTerminalOrigen/1/idTerminalDestino/2/fecha/2013-03-31/format/json
      //http://squirteam.com/charzcode/tesis/production/squirServices/services/itinerario/servicios/idTerminalOrigen/1/idTerminalDestino/2/fecha/2013-03-31/format/json
      $this->curl->create($url);
      $this->curl->http_login(REST_USER, REST_PASS);
      $jsonResponse = $this->curl->simple_get($url);
      echo $jsonResponse;
      } */

    /* function getIsUserAjax() {
      $username = $this->input->get('username');
      $password = $this->input->get('password');

      $url = REST_SERVER_SERVICES . 'usuario/isUser/username/' . $username . '/password/' . $password . '/format/json';
      //http://localhost:8080/squirServices/services/usuario/isUser/username/carlosCharz/password/12345678/format/json
      //http://squirteam.com/charzcode/tesis/production/squirServices/services/usuario/isUser/username/carlosCharz/password/12345678/format/json
      $this->curl->create($url);
      $this->curl->http_login(REST_USER, REST_PASS);
      $jsonResponse = $this->curl->simple_get($url);
      echo $jsonResponse;
      } */

    //NO SE ESTABA USANDO ANTES
    /* function getUserDataAjax() {
      $idUsuario = $this->input->get('idUsuario');

      $url = REST_SERVER_SERVICES . 'usuario/userData/idUsuario/' . $idUsuario . '/format/json';
      //http://localhost:8080/squirServices/services/usuario/userData/idUsuario/1/format/json
      //http://squirteam.com/charzcode/tesis/production/squirServices/services/usuario/userData/idUsuario/1/format/json
      $this->curl->create($url);
      $this->curl->http_login(REST_USER, REST_PASS);
      $jsonResponse = $this->curl->simple_get($url);
      echo $jsonResponse;
      } */
}